import axios from 'axios'

const portApi = {
  getLog: function (data) {
    return axios.get('https://api.gitee.com/api/v5/repos/wlySun/invest-admin/commits?page=1&per_page=20')
  },
  getSteam: function (data) {
    return axios.get('https://steamcommunity.com/market/recent?country=US&currency=1&appid=730&market_hash_name=*&format=json&count=100&start=0&steamid=76561199478169784')
  },
  getCsgo: function(data) {
    const formData = new FormData()

    // 将data对象转换为FormData
    for (const key in data) {
      formData.append(key, data[key])
    }

    return axios.post('http://103.97.179.94/api/steamInfo/selectItem', formData, {
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  }
}

export default portApi
